<template>
  <div class="login">
    <el-card>
      <el-form :model="form" ref="form" size="medium" :rules="rules">
        <el-form-item>
          <div class="theme">医疗登录入口</div>
        </el-form-item>
        <el-form-item>
          <el-radio-group v-model="form.type">
            <el-radio label="user">用户</el-radio>
            <el-radio label="doctor">医生</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item prop="username">
          <el-input v-model="form.username" placeholder="账号" prefix-icon="el-icon-user" />
        </el-form-item>
        <el-form-item prop="password">
          <el-input v-model="form.password" placeholder="密码" prefix-icon="el-icon-lock" type="password" show-password />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" style="width: 100%" @click="submit">登录</el-button>
        </el-form-item>
      </el-form>
    </el-card>
  </div>
</template>

<script lang="ts" src="./login.ts" />

<style lang="less" scoped>
.login {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #dbe9f6;
}

.theme {
  text-align: center;
  font-size: 30px;
  font-weight: bolder;
  height: 50px;
  line-height: 50px;
}

.el-form {
  width: 300px;
}

.el-radio-group {
  display: flex;
  justify-content: space-around;
}
</style>
